{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "from geoscilabs.dcip.DCWidgetResLayer2D import ResLayer_app\n",
    "from IPython.display import display\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from matplotlib import rcParams\n",
    "rcParams['font.size'] = 16"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Purpose\n",
    "\n",
    "In some situations the presence of a near surface layer can have large implications for the detectability of targets beneath the layer. If the near surface layer is very conductive current channelling occrurs and when the layer is very resistive it has a shielding effect. In both cases the near surface layer dramatically reduces the strength of currents beneath the layer and therefore also reduces the strength of charge build up on the surface of the target."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Setup\n",
    "\n",
    "<img src=\"https://github.com/geoscixyz/geosci-labs/blob/master/images/em/DC_ResLayer_Setup.png?raw=true\">"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Questions\n",
    "\n",
    "- How does the cylinder affect the apparent resistivity without the resistive layer?\n",
    "- How does the resistive layer affect the apparent resistivity? Is there a difference if you add or remove the cylinder target?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Effects of a highly resisitive surface layer"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " - **survey**: Type of survey\n",
    " - **A**: (+) Current electrode  location\n",
    " - **B**: (-) Current electrode  location\n",
    " - **M**: (+) Potential electrode  location\n",
    " - **N**: (-) Potential electrode  location\n",
    " - **$dz_{layer}$**: height/thickness of layer\n",
    " - **$zc_{layer}$**: z location of layer\n",
    " - **xc**: x location of cylinder center\n",
    " - **zc**: z location of cylinder center\n",
    " - **r**: radius of cylinder\n",
    " - **$\\rho_{1}$**: Resistivity of the halfspace\n",
    " - **$\\rho_{2}$**: Resistivity of the layer\n",
    " - **$\\rho_{3}$**: Resistivity of the cylinder\n",
    " - **Field**: Field to visualize\n",
    " - **Type**: which part of the field"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "5263f80ced6241be86ea0c7ed1bbb21e",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "MyApp(children=(ToggleButtons(description='survey', options=('Dipole-Dipole', 'Dipole-Pole', 'Pole-Dipole', 'P…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "app = ResLayer_app()\n",
    "display(app)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  },
  "widgets": {
   "state": {
    "4ab839f1d4c54d078505a9d4c6ff9d0e": {
     "views": [
      {
       "cell_index": 6
      }
     ]
    }
   },
   "version": "1.2.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
